﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="bugs.aspx.cs" Inherits="btnet.pages.bugs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title id="titl" runat="server">btnet bugs</title>
<link rel="StyleSheet" href="~/scripts/css/btnet.css" type="text/css" />
<script type="text/javascript" language="JavaScript" src="../scripts/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" language="JavaScript" src="../scripts/javascripts/bug_list.js"></script>
<script type="text/javascript">

$(document).ready(function() {
	$('.filter').click(on_invert_filter)
	$('.filter_selected').click(on_invert_filter)
})


function on_query_changed()
{
	var frm = document.getElementById(asp_form_id);
	frm.actn.value = "query";
	frm.submit();
}

</script>
</head>
<body>
<% security.write_menu(Response, PluralBugLabel); %>

<form id="form1" method="POST" runat="server">

<div class="align">

<table border="0"><tr>
	<td nowrap="nowrap">&nbsp;</td>
	<td nowrap="nowrap">
	<% if (!security.user.adds_not_allowed) { %>
	<a href="edit_bug.aspx"><img src="../images/add.png" border="0" align="top" alt="add bug" />&nbsp;add new 
	    <% Response.Write(SingularBugLabel); %></a>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<% } %>
    </td>
	<td  nowrap="nowrap">
	    <asp:DropDownList id="query" runat="server" onchange="on_query_changed()">
	    </asp:DropDownList>
	</td>
	<td nowrap="nowrap">
	&nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="print_bugs.aspx">print list</a>
	</td>
	<td  nowrap="nowrap">
	&nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="print_bugs2.aspx">print detail</a>
	</td>
	<td  nowrap="nowrap">
	&nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="print_bugs.aspx?format=excel">export to excel</a>
	</td>
	<td  nowrap="nowrap" align="right" width="100%">
	<a target="_blank" href="screen_capture.html">screen capture</a>
	</td>
	</tr>
</table>
<br />
<%
if (dv != null)
{
	if (dv.Table.Rows.Count > 0)
	{
        if (EnableTags == "1")
		{
            display_bugs_tags();
		}
		display_bugs(false);
	}
	else
	{
		Response.Write ("<p>No ");
        Response.Write(PluralBugLabel);
		Response.Write (" yet.<p>");
	}
}
else
{
	Response.Write ("<div class=err>Error in query SQL: " + sql_error + "</div>");
}
%>
<input type="hidden" name="new_page" id="new_page" runat="server" value="0" />
<input type="hidden" name="actn" id="actn" runat="server" value="" />
<input type="hidden" name="filter" id="filter" runat="server" value="" />
<input type="hidden" name="sort" id="sort" runat="server" value="-1" />
<input type="hidden" name="prev_sort" id="prev_sort" runat="server" value="-1" />
<input type="hidden" name="prev_dir" id="prev_dir" runat="server" value="ASC" />
<input type="hidden" name="tags" id="tags" value="" />

<script type="text/javascript" language="javascript">
	var enable_popups = <% Response.Write(security.user.enable_popups ? "1" : "0"); %>;
	//var asp_form_id = '<% Response.Write(formname); %>';
	var asp_form_id = 'form1';
</script>

<div id="popup" class="buglist_popup"></div>

</div>
</form>
<% Response.Write(Application["custom_footer"]); %>
</body>
</html>
